<?php
include($_SERVER["DOCUMENT_ROOT"] . "/bob.php");
//include($_SERVER["DOCUMENT_ROOT"] . "/fonctions_mysqli.php");
include($_SERVER["DOCUMENT_ROOT"] . "/fonctions_globales.php");

$mysqli = new_mysqli($host, $user, $password, $database); //connection à la DB
$variable_get = filter_input_array(INPUT_GET);
$infos = get_line_in_db($mysqli, "gens", "user_id", $_SESSION['id']);
$mpasse = hash("sha256", $infos['user_regdate'].$_GET['motpasse']);
if($infos['user_password']==$mpasse){
    echo 'OK';
}else{
    echo 'Mot de passe incorrect';
}
